package ee.ts022.tuum.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ee.ts022.tuum.dao.CustomerAddressDao;
import ee.ts022.tuum.domain.CstAddress;

@Service
public class CustomerAddressServiceImpl implements CustomerAddressService {
	
	@Autowired
	private CustomerAddressDao customerAddressDao;

	@Override
	public List<CstAddress> getCustomerAddresses(int customer) {
		return customerAddressDao.getCustomerAddresses(customer);
	}

	@Override
	public boolean delete(CstAddress cstAddress) {
		return customerAddressDao.delete(cstAddress);
	}

	@Override
	public boolean insert(CstAddress cstAddress) {
		return customerAddressDao.insert(cstAddress);
	}

	@Override
	public CstAddress getCstAddress(int cstAddress) {
		return customerAddressDao.get(cstAddress);
	}

	@Override
	public boolean save(CstAddress cstAddress) {
		return customerAddressDao.save(cstAddress);
	}

}
